def hiddenColumn(model):
    """
    获取需要影藏的字段
    :param model: 模型
    :return:
    """
    filedList = []
    if hasattr(model, "columnConstructor"):
        columnConstructorObj = getattr(model, "columnConstructor")()
        if "hiddenColumn" in columnConstructorObj.keys():
            filedList = columnConstructorObj["hiddenColumn"]
    return filedList

def showColumn(model):
    """
    获取需要显示的字段
    :param model: 模型
    :return:
    """

def primaryKeyColumn(model):
    """
    获取自定义主键字段
    :param model: 模型
    :return:
    """
    filedList = []
    if hasattr(model, "columnConstructor"):
        columnConstructorObj = getattr(model, "columnConstructor")()
        if "primaryKeyColumn" in columnConstructorObj.keys():
            filedList = columnConstructorObj["primaryKeyColumn"]
    return filedList

def loginRequired(model,requestType):
    """
    获取主键字段
    :param model: 模型
    :param requestType: 请求方法
    :return:
    """
    loginRequired = False
    if hasattr(model, "columnConstructor"):
        columnConstructorObj = getattr(model, "columnConstructor")()
        if "primaryKeyColumn" in columnConstructorObj.keys():
            if requestType in columnConstructorObj["loginRequired"]:
                loginRequired = True
    return loginRequired

def getListData(model):
    if hasattr(model, "getListData"):
        model.getListData()